#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2017-06-29 09:46:24
# @Author  : Your Name (you@example.org)
# @Link    : http://example.org
# @Version : $Id$

import urllib2

from spider_func import SpiderFunc as sf


def main():
    spf = sf()
    try:
        # http://xf.house.163.com/fz/0KRZ.html#lpk-lpxxzc-ss  无数据
        # http://xf.house.163.com/gz/BPcd.html#lpk-lpxxzc-ss  有数据
        spf.getDetailData('http://xf.house.163.com/gz/BPcd.html#lpk-lpxxzc-ss')  # 网站打不开 
    except urllib2.HTTPError, e:
        print "error code", e.code
        print "error.content", e.read()
    except urllib2.URLError, e:
        print e.reason()


if __name__ == '__main__':
    main()
